.post-selector {
	position: relative;
	background-color: var( --color-surface );
	border: 1px solid var( --color-neutral-10 );

	&.is-compact {
		background-color: transparent;
		border: none;
	}
}

.post-selector__search {
	position: relative;
}

.post-selector__search .gridicon {
	position: absolute;
	left: 0;
	padding: 8px;
}

.post-selector__search input[type='search'] {
	right: 0;
	width: 100%;
	height: 35px;
	padding: 4px 8px 4px 30px;
	border-width: 0;
	border-bottom-width: 1px;
	background: var( --color-surface );
	font-size: 14px;
	-webkit-appearance: none;
}

input[type=radio].post-selector__input,
input[type=checkbox].post-selector__input {
	margin-top: 4px;

	& + label {
		display: block;
		margin-left: 24px;
		transition: all 200ms ease-out;
		color: var( --color-neutral-70 );

		&:hover {
			color: var( --color-accent );
		}
	}
}

input[type=checkbox].post-selector__input {
	margin-right: 8px;
}

.post-selector__results {
	height: 300px;

	.post-selector.is-compact & {
		height: auto;
	}
}

.post-selector__nested-list {
	margin-left: 1em;
}

.post-selector__list-item {
	position: relative;
	padding: 2px 8px;
	font-size: 13px;

	&.is-empty {
		padding-top: 4px;
	}

	.post-selector__nested-list & {
		padding-left: 0;
		padding-right: 0;
	}
}

.post-selector__label {
	position: relative;
	display: block;
	margin-left: 24px;
	margin-top: 2px;

	.post-selector.is-type-labels-visible & {
		display: flex;
		justify-content: space-between;
	}

	.post-selector.is-compact & {
		font-size: 14px;
		margin-top: 0;
	}

	.post-selector__list-item.is-placeholder & {
		color: transparent;
		background-color: var( --color-neutral-0 );
		animation: loading-fade 1.6s ease-in-out infinite;
	}
}

.post-selector__label-type {
	display: none;
	margin-left: 8px;
	flex-shrink: 0;
	font-size: 11px;
	text-transform: uppercase;
	color: var( --color-neutral-light );

	.post-selector.is-type-labels-visible & {
		display: block;
	}
}
